﻿using System;

using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Organized;

namespace Game
{
    /// <summary>
    /// The background screen sits behind all the other menu screens.
    /// It draws a background image that remains fixed in place regardless
    /// of whatever transitions the screens on top of it may be doing.
    /// </summary>
    class BackgroundScreen : GameScreen
    {
        Texture2D backgroundTexture;

        public BackgroundScreen(String Name) :base(Name)             
        {
            
        }

       
        public override void Initialize()
        {
            backgroundTexture = Engine.Content.Load<Texture2D>("Content/Textures/UI/background");
            base.Initialize();
        }


        public override void Update()
        {
            base.Update();
        }

  

        public override void Draw(ComponentPredicate DrawPredicate)
        {
            Viewport viewport = Engine.GraphicsDevice.Viewport;

            Rectangle fullscreen = new Rectangle(0, 0, viewport.Width, viewport.Height);

            // byte fade = TransitionAlpha;

             spriteBatch.Begin(SpriteBlendMode.None);

             spriteBatch.Draw(backgroundTexture, fullscreen, Color.White);

             spriteBatch.End();

          
            base.Draw(DrawPredicate);
        }


    }
}
